﻿using System;
using System.ComponentModel.DataAnnotations;
using BoneSystem.Business.Entity.Pessoa.SubClass.PessoaFisica;
using BoneSystem.Business.Entity.Pessoa.SubClass.PessoaJuridica;
using BoneSystem.Extensions.Annotations;
using BoneSystem.Extensions.DataAnnotations;

namespace BoneSystem.Business.Entity.Pedido
{
    public class Pedido : PropertiesBase
    {
        [Required]
        [Display(Description = "Cliente", Name = "Cliente", Order = 1)]
        [HeaderGridView(EnableFilter = true)]
        [GridColumn(FieldName = "Nome", TableColumnName = "nome", Order = 2, Width = 150)]
        [GridColumn(FieldName = "RazaoSocial", TableColumnName = "razao_social", Order = 2, Width = 150)]
        //[PessoaCast]
        public virtual Pessoa.Pessoa Pessoa { get; set; }

        [Required]
        [Display(Description = "Data operação", Name = "Data", Order = 2)]
        [HeaderGridView(EnableFilter = true)]
        [GridColumn(TableColumnName = "data_operacao", Order = 2, Width = 150)]
        public virtual DateTime? DataOperacao { get; set; }

        public Pedido()
        {
            DataOperacao = DateTime.Now;
        }
    }
}
